<?php
	global $_W,$_GPC;
	if($_W['role']){
		$class = pdo_fetchall("SELECT id,categoryname FROM ".tablename('mii_ang_class')." WHERE uniacid=:uniacid AND ishide=:ishide ORDER BY category_order DESC",array(':uniacid'=>$_W['uniacid'],':ishide'=>'1'));
		$goods = pdo_fetchall("SELECT id,goodsname FROM".tablename('mii_ang_goods')." WHERE uniacid=:uniacid AND grounding=:grounding ORDER BY orderid DESC",array(':uniacid'=>$_W['uniacid'],':grounding'=>'1'));
		if(!empty($class)){
			$classArr.='';
			$classNum = count($class,0);			
			foreach ($class as $k => $c) {
				if($k+1==$classNum){
					$classArr.="\"".$c['id'].",".$c['categoryname']."\""; 
				}else{
					$classArr.="\"".$c['id'].",".$c['categoryname']."\",";
				}
			}			
		}
		if(!empty($goods)){
			$goodsArr.='';
			$goodsNum = count($goods,0);
			foreach ($goods as $k => $g) {
				if($k+1==$goodsNum){
					$goodsArr.="\"".$g['id'].",".$g['goodsname']."\""; 
				}else{
					$goodsArr.="\"".$g['id'].",".$g['goodsname']."\",";
				}
			}
		}
		include $this->template('web/menu/addbottommenu');	
	}else{
		message('没有操作权限');
	}



?>